from ronglian_sms_sdk import SmsSDK
from celery_tasks.main import app
accId = '8aaf070881ad8ad401821a33b54c1b39'
accToken = '14fe61527f4a4bacade13e6e8acebebb'
appId = '8aaf070881ad8ad401821a33b61c1b40'
@app.task(name='send_sms_code')
def send_sms_code(mobile,data):
    sdk = SmsSDK(accId, accToken, appId)
    tid = '1'  # 容联云分配的一个测试短信验证码模版
    datas = (data,)  #元组
    resp = sdk.sendMessage(tid, mobile, datas)
    return resp